<link href="../addons/jy_area_agent/resource/css/style.css" rel="stylesheet">
<style type="text/css">
	.icon1 {
		width: .8rem; height: .8rem;
		vertical-align: -0.15em;
		fill: currentColor;
		overflow: hidden;
	}
</style>
<div class="fui-page fui-page-current page-commission-index ">
    <div class='fui-content'>
	<div style="background: {{main.syscolor||'#05c175'}};padding:1rem 0.5rem;margin-top:0;padding-bottom:1.6rem;">
			<div class="fui-cellone" style="padding:0">
				<div class="fui-cellone-label" style="width:auto;">
					<img style="border-radius: 0.2rem;width:2.2rem;height:2.2rem" ng-src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/gw-user.png'}}" />
				</div>
				<div class="fui-cellone-text" style="font-size:0.7rem;color:#fff;padding-left:0.5rem">
					<div class="bold">{{pagedata.member.nickname || '昵称'}} </div>
					<div style="font-size:0.6rem">{{pagedata.member.mobile}}</div>
					<div>
						<span style="font-size:0.7rem;margin-top:0.3rem;color:#f2f2f2">({{pagedata.member.leveltitle}})<i class='icon icon-question' style='font-size:8px;'></i></span>
					</div>
				</div>
				<div class="fui-cellone-remark noremark" style="font-size:1rem;color:#fff;">
					<span ng-if="pagedata.pluginset.yajin_open==1 && (!pagedata.item.is_yajinfee || pagedata.item.is_yajinfee<=0.00)" class="fui-tag-red-o" ng-click="access_json('jy_area_agent/setyajin/')" style="margin-top:-0.2rem;padding:0.06rem 0.3rem;">缴纳保证金</span>
				</div>
			</div>	
			<div class="fui-icon-group noborder  col-3" style="padding-top:0.5rem">
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">{{pagedata.setting.commission_total}}</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.data.commission_total || '0.00'}}</div>
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">佣金笔数</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.data.commission_count || 0}}</div>
														
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">区域数</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.data.area_num || 0}}</div>
													</div>
					</div>
			</div>			
	</div>
	<div class='jy-content' style="margin-top:-2rem">
		<div class="userblock">
			<div class="line total new">
				<div class="num">{{pagedata.data.balance_total || '0.00'}}</div>
				<div class="title">{{pagedata.setting.balance_total}}(元)</div>
			</div>
			<div class="line usable new">

				<div class="text">
					<div class="num">{{pagedata.data.commission_1  || '0.00'}}</div>
					<div class="title">{{pagedata.setting.commission_1}}(元)</div>
				</div>		
				<a ng-if="pagedata.data.commission_1 > 0" ng-click="access_json('/commission/')" class="btn btn-warning external" ><span style="line-height: 1">{{pagedata.setting.balance_button}}</span></a>
				<div ng-if="pagedata.pluginset.xuni_change==1" ng-click="pagedata.showchange=true" class="btn btn-warning external" ><span style="line-height: 1">{{pagedata.xuniname}}转余额</span></div>
			</div>
		</div>
		<div class="fui-block-group col-2" style='overflow: hidden;'>
            <a class="fui-block-child new  external" href="javascript:;" ng-click="access_json('/commission/main')">
                <div class="icon " style="color: #ff4357;"><i class="icon jinyunicon icon-caifua"></i></div>
                <div class="text new">
					<div class="title">{{pagedata.setting.commission_total}}</div>
                    <div class=""><span>{{pagedata.data.commission_total || 0.00}}</span> 元</div>
				</div>
            </a>
			<a ng-if="pagedata.pluginset.xuni_open==1" class="fui-block-child new  external" href="javascript:;" ng-click="access_json('/order/main/isxuni=1')">
                <div class="icon " style="color: #ff4357;"><i class="icon jinyunicon icon-caifua"></i></div>
                <div class="text new">
					<div class="title">{{pagedata.xuniname}}</div>
                    <div class=""><span>{{pagedata.data.commission_xuni || '0.00'}}</span> 个</div>
				</div>
            </a>
            <a class="fui-block-child new external" href="javascript:;" ng-click="access_json('/order/main')">
                <div class="icon" style="color: #9ec9f4;"><i class="icon jinyunicon icon-dingdan"></i></div>
				<div class="text new">
					<div class="title">{{pagedata.setting.agent_order}}</div>
					<div class=""><span>{{pagedata.data.order_num || 0}}</span> 笔</div>
				</div>
            </a>
            <a class="fui-block-child new  external" href="javascript:;" ng-click="access_json('/balance/main')">
                <div class="icon" style="color: #ffbe2e;"><i class="icon jinyunicon icon-wodeqianbao"></i></div>
				<div class="text new">
					<div class="title">结算</div>
					<div class=""><span>{{pagedata.data.balance_num || 0}}</span> 笔</div>
				</div>
            </a>
            <a class="fui-block-child new  external" href="javascript:;" ng-click="access_json('/area/')">
                <div class="icon" style="color: #ffbe2e;"><i class="icon jinyunicon icon-wodeqianbao"></i></div>
				<div class="text new">
					<div class="title">{{pagedata.setting.agent_quyu}}</div>
					<div class=""><span>{{pagedata.data.area_num || 0}}</span> 个</div>
				</div>
            </a>

		</div>
		<div class="fui-cell-group">
			<a class="fui-cell" ng-click="access_json('/area/')">
				<div class="fui-cell-icon ">
					<i class="icon jinyunicon icon-caifub text-yellow"></i>
				</div>
				<div class="fui-cell-text">{{pagedata.setting.myagent_quyu}}</div>
				<div class="fui-cell-remark" style="font-size: 0.5rem;"></div>
			</a>
			<a class="fui-cell" ng-click="access_json('/yajin_log/')">
				<div class="fui-cell-icon ">
					<i class="icon icon-caifub text-yellow"></i>
				</div>
				<div class="fui-cell-text">押金明细</div>
				<div class="fui-cell-remark" style="font-size: 0.5rem;"></div>
			</a>
		</div>
	</div>
		<div class="fui-cell-group fui-cell-click" style="background:none">
							<a class="fui-cell external changepwd" href="javascript:;" ng-click="access_json('core/member.cpassword/')">
								<div class="fui-cell-text" style="text-align: center;">修改密码</div>
							</a>
							<a class="fui-cell external btn-logout" ng-click="post_json('core/member.logout/')">
								<div class="fui-cell-text" style="text-align: center;">退出登录</div>
							</a>
		</div>
	<!--<div class="weui_btn_area" ng-if="pagedata.become==2">
			 <a class="weui_btn weui_btn_red" href="javascript:"  ng-click="access_json('/apply/')">申请区域代理</a>
	</div>-->
</div>
</div>
<div ng-if="pagedata.showchange" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showchange=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行【{{pagedata.xuniname}}】转余额操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'><i class="icon icon-dixiaofei" style="font-size:0.8rem"></i></div>
					<div class='fui-cell-info'><input type='text' class='fui-input' placeholder="额度" ng-change="pagedata.upfee()" ng-model="pagedata.post.jifen"></div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<div class="c" style="font-size:0.6rem;margin-top:-0.3rem;color:#fff">
						得余额：￥{{pagedata.post.fee || 0}} （转换比例：{{pagedata.credit_rate}}比1）						
				</div>
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="post(pagedata.post,'/index/change/')">确认兑换</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.upfee=function(){
	scope.pagedata.post.fee=(scope.pagedata.post.jifen/scope.pagedata.credit_rate).toFixed(2);
}
</script>